local skel = fk.CreateSkill {
  name = "emo__jiguangsq",
}

skel:addEffect("active", {
  anim_type = "offensive",
  prompt = "#emo__jiguangsq",
  card_num = 0,
  target_num = 1,
  target_filter = function (self, player, to_select, selected)
    return #selected == 0 and player ~= to_select
  end,
  can_use = function (self, player)
    return player:usedSkillTimes(skel.name, Player.HistoryPhase) < (1 + player:getMark("emo__jiguangsq-turn"))
  end,
  times = function (self, player)
    return (1 + player:getMark("emo__jiguangsq-turn")) - player:usedSkillTimes(skel.name, Player.HistoryPhase)
  end,
  on_use = function (self, room, effect)
    local player = effect.from
    room:damage { from = player, to = effect.tos[1], damage = 1, skillName = skel.name }
  end,
})

skel:addEffect(fk.CardUsing, {
  can_refresh = function (self, event, target, player, data)
    if target == player and player:hasSkill(skel.name, true) and data.card.type == Card.TypeBasic
    and player:getMark("emo__jiguangsq-turn") == 0 then
      return #player.room.logic:getEventsOfScope(GameEvent.UseCard, 3, function(e)
        local use = e.data
        return use.from == player and use.card.type == Card.TypeBasic
      end, Player.HistoryTurn) > 2
    end
  end,
  on_refresh = function (self, event, target, player, data)
    player.room:setPlayerMark(player, "emo__jiguangsq-turn", 1)
  end,
})


Fk:loadTranslationTable{
  ["emo__jiguangsq"] = "激光束群",
  [":emo__jiguangsq"] = "出牌阶段限一次，你可以对一名其他角色造成一点伤害，若你本回合使用过三张基本牌，此技能本回合发动次数+1。",
  ["#emo__jiguangsq"] = "激光束群，对一名其他角色造成一点伤害",
}


return skel
